﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LKL_Code.PlcControl
{
    public interface IPlc
    {
        // plc的品牌选择       
        Plc_Brand Plc_Brand { get; set; }



    }

    /// <summary>
    /// PLC品牌选择
    /// </summary>
    public class Plc_Brand
    {
        public string Name { get; set; }
    }

    public class Communication_mode
    {
        /// <summary>
        /// plc串口通讯
        /// </summary>
        public class Serial_Port
        {
            /// <summary>
            /// 通讯端口
            /// </summary>
            public string COM;

            /// <summary>
            /// 波特率
            /// </summary>
            public int Baud_rate;

            /// <summary>
            /// 数据位
            /// </summary>
            public int Data_bit;

            /// <summary>
            /// 停止位
            /// </summary>
            public int Stop_bit;
            /// <summary>
            /// 校验位
            /// </summary>
            public int Check_bit;

            /// <summary>
            /// 回复超时
            /// </summary>
            public int Response_time;

            /// <summary>
            /// 延迟轮询
            /// </summary>
            public int DelayBrtweenPolls;
        }

        public class Tcp_Ip
        {
            /// <summary>
            /// IP地址
            /// </summary>
            public string Ip_Address;

            /// <summary>
            /// 端口号
            /// </summary>
            public string server_port;

            /// <summary>
            /// 连接超时
            /// </summary>
            public int Connect_Timeout;
        }


    }

    
    
}
